package org.oslims.client.service;

import java.util.List;

import org.oslims.domain.AbstractSample;
import org.oslims.domain.Analysis;
import org.oslims.domain.Mixture;
import org.oslims.domain.Request;
import org.oslims.domain.Sample;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

@RemoteServiceRelativePath("sampleService")
public interface SampleService extends RemoteService {

	public void saveOrUpdateSample(Sample sample);

	public Integer getSampleCount(Request request);

	public List<AbstractSample> getAllSamplesReadyForAnalysisByRequest(Request request);

	public List<Sample> getSamplesByRequest(Request request);

	public List<Sample> getSamplesByRequest(Request request, int start, int length, String sortBy, boolean desc);

	public List<Sample> searchSamples(String sampleCode, String description, String origin, String requestCode, String sampleType, String storagePlace);

	public void markSamplesAsRecieved(List<Sample> samples, String storagePlace);

	public void importSamplesForRequest(List<Sample> sample, Request request);

	public void saveOrUpdateMixture(Mixture mixture);

	public List<Mixture> getAllMixturesByRequest(Request request);

	public List<Mixture> getAllMixturesByRequest(Request request, int start, int length, String sortBy, boolean desc);

	public Integer getMixtureCount(Request request);

	public List<Mixture> searchMixtures(String sampleCode, String description, String origin, String requestCode, String sampleType, String storagePlace);

	public void markMixturesAsPrepared(List<Mixture> mixtures, String storagePlace);

	public void importMixtureForRequest(List<Mixture> mixture, Request request);

	public List<AbstractSample> getAllSamplesByRequest(Request request);

	public List<AbstractSample> searchAllSamples(String sampleCode, String description, String origin, String requestCode, String sampleType, String storagePlace);

	List<AbstractSample> getSamplesByAnalysisAndState(Analysis analysis, String state);

	public void validateSampleResults(List<AbstractSample> samples);

}
